<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>ArcGISOnline</title>
        <script type="text/javascript">
         //copy from http://gmaps-samples.googlecode.com/svn/trunk/versionchecker.html?v=2.86
          function getURLParam(name) {
            var regexS = "[\\?&]" + name + "=([^&#]*)";
            var regex = new RegExp(regexS);
            var results = regex.exec(window.location.href);
            return (results === null ? "" : decodeURIComponent(results[1]));
          }
          var v = getURLParam('v')||'2';
          document.write('<script src="http://maps.google.com/maps?file=api&amp;v='+v+'&amp;key=ABQIAAAAjU0EJWnWPMv7oQ-jjS7dYxQGj0PqsCtxKvarsoS-iqLdqZSKfxRdmoPmGl7Y9335WLC36wIGYa6o5Q" type="text/javascript"><'+ '/script>');
        </script>
        
        <script type="text/javascript">
         document.write('<script type="text/javascript" src="../src/arcgislink'+(document.location.search.indexOf('packed')>-1?'_packed':'')+'.js"><'+'/script>');
        </script>
        <script type="text/javascript">
        
        function init(){
          var base = 'http://server.arcgisonline.com/ArcGIS/rest/services';
          var type = new ArcGISMapType([new ArcGISTileLayer(base + '/ESRI_StreetMap_World_2D/MapServer')]);
          GEvent.addListener(type,'load', function(){
            var map = new GMap2(document.getElementById("map"), {
              mapTypes: [type]
            });
            map.setCenter(new GLatLng(40,-95), 4);
            
            map.addControl(new GMapTypeControl());
            map.addControl(new GLargeMapControl());
            map.addControl(new GScaleControl());
            map.enableDoubleClickZoom();
            map.enableContinuousZoom();
            map.enableScrollWheelZoom();
            // now start add more services
            map.addArcGISMap(base + "/ESRI_Imagery_World_2D/MapServer");
            map.addArcGISMap(base + "/ESRI_ShadedRelief_World_2D/MapServer");
            map.addArcGISMap(base + "/I3_Imagery_Prime_World_2D/MapServer");
            map.addArcGISMap(base + "/NGS_Topo_US_2D/MapServer");
            map.addArcGISMap(base + "/USA_Topo_Maps/MapServer");
            map.addArcGISMap(base + "/NPS_Physical_World_2D/MapServer");
            map.addArcGISMap(base + "/Demographics/ESRI_00-08PopGrwth_US_2D/MapServer");
            map.addArcGISMap(base + "/Demographics/ESRI_Diversity_US_2D/MapServer");
            map.addArcGISMap(base + "/Demographics/ESRI_MedianIncome_US_2D/MapServer");
            map.addArcGISMap(base + "/Specialty/EVC_Topo_World_2D/MapServer");
          });
        }
        </script>
    </head>
    <body onload="init()">
       <a href='../docs/examples.html'>More examples</a> | Use
       <a href='?packed'>Packed </a> | 
       <a href='?'> Unpacked</a> Version of the script.
       <br/>
       <br/>Check <a target="_blank" href='http://resources.esri.com/arcgisonlineservices/index.cfm?fa=Licensing'>Licensing</a> before you use these services.
       
        <div id="map" style="width:800px; height:400px; border:1px solid #000;">
        </div>
    </body>
</html>
